//
//  friend_func.cpp
//  learnC++
//
//  Created by apple on 2018/6/4.
//  Copyright © 2018年 yunfan.com. All rights reserved.
//

#include "friend_func.hpp"

Storage2::Storage2(int nValue,double dValue){
    m_nValue = nValue;
    m_dValue = dValue;
}

Display::Display(bool displayIntFirst){
    m_displayIntFirst = displayIntFirst;
}

void Display::displayItem(Storage2 &storage){
    if (m_displayIntFirst)
        std::cout << storage.m_nValue << " " << storage.m_dValue << '\n';
    else // display double first
        std::cout << storage.m_dValue << " " << storage.m_nValue << '\n';
}
